<template>
  <div>
      <p>组件2</p>
      <p>电脑：{{ computer }}</p>
      <p v-if='wj'>{{wj}}</p>
  </div>
</template>

<script lang="ts" setup>
import eventBus from '../utitls/eventBus';
import { ref, unref, reactive, toRaw, toValue } from 'vue';
let computer = ref('联想')
// 发送事件
let wj = ref('');

eventBus.on('send-toy', (value) => {
  console.log('send-toy', value)
  wj.value=value
})

</script>